// eslint-disable import/no-unresolved
import {
  LocationReloadPlugin,
  EventTargetPlugin,
  DocFullscreenPlugin,
  WindowGetterPlugin,
  WindowMessagePlugin,
  InstanceofPlugin
  // eslint-disable-next-line import/no-unresolved
} from 'wujie-polyfill';
export const plugins = [
  {
    // 子应用主题样式处理
    cssLoader: (code) => {
      const rootStyleReg = /:root/g;
      const hostStyleReg = /:host/g;
      let newCode = code;
      newCode = newCode.replace(rootStyleReg, ':host').replace(hostStyleReg, ':host html');
      return newCode;
    }
  },
  LocationReloadPlugin(),
  EventTargetPlugin(),
  DocFullscreenPlugin(),
  WindowGetterPlugin(),
  WindowMessagePlugin(),
  InstanceofPlugin()
  // { jsBeforeLoaders: [{ content: 'window.Antdv = window.parent.Antdv;window.AvicUI = window.parent.AvicUI' }]}
];
